package com.cgc.venus.server.job.config;

import com.cgc.venus.server.core.utils.StringUtil;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
 * Created by 业哥 on 2016-7-31.
 */
@Component
@ConfigurationProperties(prefix="job")
public class JobConfig {
    private Double storage_count_all;
    private String routeApiUrl;
    private String quartzPropertiesPath;
    private String smTopicProfilesActive="test";
    private String smTopic="容器云平台测试环境";
    private int keepEsLogDay=90;//保留es日志天数 默认90天
    private boolean emailEnable;
    private boolean smEnable;

    public String getSmTopicProfilesActive() {
        return smTopicProfilesActive;
    }

    public void setSmTopicProfilesActive(String smTopicProfilesActive) {
        this.smTopicProfilesActive = smTopicProfilesActive;
    }

    public int getKeepEsLogDay() {
        return keepEsLogDay;
    }

    public void setKeepEsLogDay(int keepEsLogDay) {
        this.keepEsLogDay = keepEsLogDay;
    }

    public boolean isSmEnable() {
        return smEnable;
    }

    public void setSmEnable(boolean smEnable) {
        this.smEnable = smEnable;
    }

    public boolean isEmailEnable() {
        return emailEnable;
    }

    public void setEmailEnable(boolean emailEnable) {
        this.emailEnable = emailEnable;
    }

    public String getSmTopic() {
        if("dev".equals(smTopicProfilesActive)){
            return "容器云平台开发环境";
        }
        if("pro".equals(smTopicProfilesActive)){
            return "容器云平台生产环境";
        }
        return smTopic;
    }

    public void setSmTopic(String smTopic) {
        this.smTopic = smTopic;
    }

    public String getQuartzPropertiesPath() {
        return quartzPropertiesPath;
    }

    public void setQuartzPropertiesPath(String quartzPropertiesPath) {
        this.quartzPropertiesPath = quartzPropertiesPath;
    }
    public String getRouteApiUrl() {
        return routeApiUrl;
    }

    public void setRouteApiUrl(String routeApiUrl) {
        this.routeApiUrl = routeApiUrl;
    }

    public Double getStorage_count_all() {
        return storage_count_all;
    }

    public void setStorage_count_all(Double storage_count_all) {
        this.storage_count_all = storage_count_all;
    }
}
